<template>
	<view>
		<text>我是test组件{{msg}}</text>
		<button type="primary" @click="test">按钮</button>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				
			};
		},
		props: {
			msg: {
				type: String
			}
		},
		methods: {
			test () {
				// $emit 触发事件
				// this.$emit("testShowName", {name:"haha"})
				uni.$emit("testEmit", {name: "yeye"})
			}
		}
	}
</script>

<style lang="scss">

</style>
